import { Tabs } from 'antd';
import type { TabsProps } from 'antd';
import { useState, } from 'react'
import "../index.less"
import CommodityManagement from './CommodityManagement';
import OrderManagement from './OrderManagement';
import EditData from './EditData';

export default function Admin() {
    const onChange = (key: string) => {
        console.log(key);
    };
    const [nullValue,] = useState({
        id: undefined,
        category: undefined,
        shopName: undefined,
        shopPicture: undefined,
        babyDescription: undefined,
        sellerService: undefined,
        logisticsService: undefined,
        shopIMG: undefined,
        commodityName: undefined,
        sales: undefined,
        price: undefined,
        nowPrice: undefined,
        detail: undefined,
        detailIMG: undefined,
        comments: undefined,
    });
    const items: TabsProps['items'] = [
        {
            key: '1',
            label: `商品管理`,
            children: <CommodityManagement />,
        },
        {
            key: '2',
            label: `商品修改`,
            children: <EditData info={nullValue} chooseNum={'0'} text={"新增"} />,
        },
        {
            key: '3',
            label: `订单管理`,
            children: <OrderManagement />,
            // children: <OriginalBottle />,
        },
    ];
    return (
        <div className='admin common'>
            <Tabs className='tabs' destroyInactiveTabPane={true} tabPosition={"left"} centered={true} defaultActiveKey="1" items={items} onChange={onChange} />
        </div>
    )
}
